package com.zhuang.designpattern.visitor.visitor.impl;

import com.zhuang.designpattern.visitor.user.impl.Student;
import com.zhuang.designpattern.visitor.user.impl.Teacher;
import com.zhuang.designpattern.visitor.visitor.Visitor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * description: Parent
 * date: 2022/9/22 17:15
 * author: Zhuang
 * version: 1.0
 */
public class Parent implements Visitor {

    private final Logger logger = LoggerFactory.getLogger(Parent.class);


    public void visit(Student student) {
        logger.info("学生信息 姓名：{} 班级：{} 排名：{}", student.name, student.clazz, student.ranking());
    }
    public void visit(Teacher teacher) {
        logger.info("老师信息 姓名：{} 班级：{} 级别：{}", teacher.name, teacher.clazz, teacher.identity);
    }

}
